﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="DanhSachQuyen.aspx.cs" Inherits="MinaServices_Roles_DanhSachQuyen" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Panel runat="server" ID="pnShow" Width="100%">
        <table id="table1" style="border-collapse: collapse; background-color: lemonchiffon;">
            <tr>
                <td>
                    <asp:Button ID="btnThem" runat="server" CssClass="btnthem" Text="Thêm mới" OnClick="btnThem_Click">
                    </asp:Button>
                    <asp:Button ID="btnXoa" runat="server" CssClass="btnXoa" Text="Xóa" OnClientClick="return confirm(&quot;Bạn có muốn xóa không?&quot;)"
                        OnClick="btnXoa_Click"></asp:Button>
                </td>
            </tr>
            <tr>
                <asp:DataGrid runat="server" AllowPaging="true" AutoGenerateColumns="False" CellPadding="4"
                    ForeColor="#333333" Width="100%" PageSize="10" ID="grdRoles" OnItemCommand="grdRoles_ItemCommand"
                    OnItemDataBound="grdRoles_ItemDataBound" OnPageIndexChanged="grdRoles_PageIndexChanged">
                    <AlternatingItemStyle BackColor="White" />
                    <HeaderStyle CssClass="trHeader"></HeaderStyle>
                    <Columns>
                        <asp:TemplateColumn ItemStyle-CssClass="tdCenter">
                            <HeaderTemplate>
                                <asp:CheckBox ID="chkSelectAll" runat="server" AutoPostBack="False"></asp:CheckBox></HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chkSelect" runat="server"></asp:CheckBox></ItemTemplate>
                            <ItemStyle CssClass="tdCenter"></ItemStyle>
                        </asp:TemplateColumn>
                        <asp:BoundColumn DataField="ROLEID" HeaderText="ID Roles" />
                        <asp:BoundColumn DataField="ROLENAME" HeaderText="Tên Quyền" />
                        <asp:TemplateColumn>
                            <HeaderTemplate>
                                Chức Năng</HeaderTemplate>
                            <ItemTemplate>
                                <asp:LinkButton runat="server" ID="lbt1" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "ROLEID") %>'
                                    CommandName="Edit" CssClass="edit" ToolTip="Sửa" />
                                ||
                                <asp:LinkButton runat="server" ID="lbt2" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "ROLEID") %>'
                                    CommandName="Delete" CssClass="delete" ToolTip="   Xóa" OnClientClick="return confirm('Bạn có muốn xóa không?');" />
                            </ItemTemplate>
                        </asp:TemplateColumn>
                    </Columns>
                    <EditItemStyle BackColor="#2461BF"></EditItemStyle>
                    <HeaderStyle BackColor="#507CD1" Font-Bold="true" ForeColor="White"></HeaderStyle>
                    <ItemStyle BackColor="#EFF3FB"></ItemStyle>
                    <PagerStyle BackColor="#F3F8FE" ForeColor="Blue" HorizontalAlign="Center" Mode="NumericPages">
                    </PagerStyle>
                    <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="true" ForeColor="#33333"></SelectedItemStyle>
                </asp:DataGrid>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnUpdate" runat="server" Visible="false">
        <table id="table2" style="border-collapse: collapse;" cellpadding="0" width="100%">
            <tr>
                <td>
                    <asp:TextBox ID="txtRolesID" runat="server" Visible="False"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="width: 150px;" class="name_fild_row">
                    Tên Quyền
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <caption>
                <br />
                <tr>
                    <td class="name_fild_row" style="width: 150px;">
                    </td>
                    <td>
                        <br />
                        <asp:LinkButton ID="lblUpdate" runat="server" CssClass="update" OnClick="lblUpdate_Click"> Cập Nhật </asp:LinkButton>
                        <asp:LinkButton ID="lblBack" runat="server" CssClass="back" OnClick="lblBack_Click"> Trở Lại </asp:LinkButton>
                        <br />
                    </td>
                </tr>
            </caption>
        </table>
    </asp:Panel>
</asp:Content>
